/*****************************************************************
 Naicigam Engine v0.1

 File: VertexBuffer.h
 Created: 01/03/08
*****************************************************************/

//----------------------------------------------------------------
#ifndef VERTEX_BUFFER_H
#define VERTEX_BUFFER_H
//----------------------------------------------------------------
#include <vector>
//----------------------------------------------------------------
using namespace std;
//----------------------------------------------------------------
namespace leo
{
//----------------------------------------------------------------
template<class VertexFormat, unsigned int FVF>
//----------------------------------------------------------------
class VertexBuffer
{
public:
	DECLARE_SMART_POINTER(VertexBuffer);

	VertexBuffer(unsigned int _count); 
	unsigned int GetId() const;

	void SetVertex(unsigned int _index, const VertexFormat& _v);
	const VertexFormat& GetVertex(unsigned int _index) const;
	size_t GetVertexCount() const;
	
	const VertexFormat* GetVerticesPtr () const;
	VertexFormat* GetVerticesPtr ();

private:
	std::vector<VertexFormat> vertices;
	unsigned int id;
	static unsigned int currentId;
};
//----------------------------------------------------------------
#include "VertexBuffer.inl"
//----------------------------------------------------------------
} // end namespace
//----------------------------------------------------------------
#endif // _VS_VERTEX_BUFFER_H_
//----------------------------------------------------------------
